<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul {
            margin: 100px auto;
            width: 300px;
        }
        li {
            list-style: none;
            float: left;
            /* 开启3d */
            transform-style: preserve-3d;
            /* 重新设置旋转中心点 */
            transform-origin: center 20px;
            /* 添加一个过渡 */
            transition: all 1s;
        }
        a {
            width: 100px;
            height: 40px;
            color: #fff;
            display: block;
            text-align: center;
            line-height: 40px;
            text-decoration: none;
        }
        a:first-child {
            background-color: #80d580;
            /* 绿色面往前移动橙色面高度一半 */
            transform: translateZ(20px);
        }
        a:last-child {
            background-color: #ffd27f;
            /* 橙色面向上移动自身高度的150%，再旋转90° */
            transform: translateY(-60px) rotateX(90deg);
        }
        /* hover旋转 */
        li:hover {
            transform: rotateX(-90deg);
        }
    </style>
</head>
<body>
    <ul>
        <li><a href="#">首页</a><a href="#">index</a></li>
        <li><a href="#">登入</a><a href="#">login</a></li>
        <li><a href="#">注册</a><a href="#">register</a></li>
    </ul>
</body>
</html>